﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="VesselView.aspx.cs" Inherits="VesselView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="ModuleContent">
        <ul class="NavigationButtons">
            <li>
                <asp:LinkButton ID="lbAddNew" CssClass="navigation_button" Text="Add New" runat="server" PostBackUrl="~/VesselEdit.aspx?m=liVessel" />
            </li>
        </ul>
    </div>
    <asp:GridView ID="VesselGirdView" CssClass="skineedgrid" runat="server"
        DataSourceID="VesselDS" AutoGenerateColumns="false" Width="75%" DataKeyNames="RecordID" 
        AllowSorting="true"  AllowPaging="true" PageSize="10">
        <Columns>
            <asp:BoundField DataField="RecordID" HeaderText="ID" Visible="False" />
            <asp:BoundField DataField="ID" HeaderText="ID" Visible="False" />
            <asp:BoundField DataField="Name" HeaderText="Title" SortExpression="Name" />
            <asp:BoundField DataField="VesselType.Name" HeaderText="Vessel Type" SortExpression="VesselType.Name" />
            <asp:BoundField DataField="Flag.Name" HeaderText="Flag" SortExpression="Flag.Name" />
            <asp:BoundField DataField="CreateDate" HeaderText="Create Date" SortExpression="CreateDate" DataFormatString="{0:dd/MM/yyyy}" />
            <asp:TemplateField>
                <ItemTemplate>
                    <a href="vesselhistory.aspx?id=<%#Eval("ID") %>&m=liVessel">History</a>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="VesselDS" runat="server" SortParameterName="sortBy" SelectMethod="GetVessels" TypeName="DAL.DBManagers.VesselsManager"></asp:ObjectDataSource>
</asp:Content>

